<template>
 <view class="u-wrap">

 <view>
	 
	 
	 
 <u-grid :col="3">
<view class="list-box" v-for="(dy,index) in dianyings" :key="dy.id">
					<view class="list-ed">
						<image src="../../static/发布.png" style="width: 50px; height: 50px" mode="widthFix" class="cover-image"@click="play(dy.id)"></image>
						<view class="list-right">
							
							<view class="list-name" @click="play(dy.id)">{{dy.ming}}</view>
							<view class="list-da">
								<view>简介：<text @click="play(dy.id)">{{dy.ming}}</text></view>
 
							</view>
						</view>
					</view>
			</view>


 
 </u-grid>
 </view>
 
 </view>
</template>
<script>
 export default {
 data() {
 return {
 //轮播图
 list: [{
 image: '../../static/filmpics/film7.jpeg',
 title: '昨夜星辰昨夜风，画楼西畔桂堂东'
 },
 {
 image: '../../static/filmpics/film8.jpeg',
 title: '身无彩凤双飞翼，心有灵犀一点通'
 },
 {
 image: '../../static/filmpics/film9.jpeg',
 title: '谁念西风独自凉，萧萧梧叶闭疏窗，沉思往事立残阳'
 }
 ],
 title: true,
 mode: 'round',
 indicatorPos: 'bottomCenter',
 effect3d: false,
 //结束轮播图
   //定义电影集合
   dianyings:[1,2,3]
 }
 },
 computed: {
 },
 //一加载就请求电影信息
 onLoad(){
	uni.request({
		url:"http://localhost:8080/dianyings",
		success:(res)=>{
			console.log(res);
			//更新电影集合
           	this.dianyings=res.data.result;
		}
	}) 
 },
 methods: {
	 play(dyid){
		 console.log("播放");
		 uni.navigateTo({
		 	url:"/pages/XJX_pages/bokezhengwen?id="+dyid
		 })
	 },
	 
 //轮播图
 click(index) {
 this.$refs.uToast.show({
 title: `点击了第${index + 1}张图片`,
 type: 'success'
 })
 },
 change(index) {
 // console.log(index);
 }
 //结束轮播图
 ,
 imageError() {
 }
 }
 }
</script>
<style scoped lang="scss">
 @import "@/common/demo.scss"; 
 page{
 		background-color: #eee;
 	}
 	
 	.list-box {
 		
 		display: flex;
 		flex-direction: column;
 		background-color: #fff;
 		margin: 0upx 100upx 0upx 0upx;
 		padding: 70upx;
 		border-radius: 0upx;
 	}
  
 	.list-ed {
 		font-size: 40rpx;
 		display: flex;
 		flex-direction: row;
 		justify-content: center;
 		align-items: center;
 	}
  
 	.list-left {
 		margin-right: 16upx;
 	}
  
 	.list-img {
 		
 		width: 0upx;
 		height: 0upx;
 		margin: 0upx 16upx 0upx 0upx;
 	}
  
 	.list-right {
 		
 		display: flex;
 		flex-direction: column;
 		width: 510upx;
 		height: 180upx;
 	}
  
 	.list-right-img {
 		width: 140upx;
 		height: 38upx;
 	}
  
 	.noadsop {
 		width: 120upx;
 		height: 32upx;
 	}
  
 	.list-head {
 		
 		display: flex;
 		justify-content: flex-end;
 		margin-bottom: 10upx;
 	}
  
 	.list-name {
 		overflow: hidden;
 		text-overflow: ellipsis;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 2;
 		margin-bottom: 10upx;
 	}
  
 	.list-da {
 		
 		display: flex;
 		flex-direction: row;
 		font-size: 26upx;
 	}
  
 	.list-da view {
 		
 		width: 100%;
 	}
  
 	.list-da view text {
 		
 		color: f0f0f0;
 	}
  
 	.sure {
 		
 		background: #FF6000;
 		color: #FFFFFF;
 		width: 600upx;
 		height: 70upx;
 		display: flex;
 		justify-content: center;
 		align-items: center;
 		border-radius: 40upx;
 		margin: 60upx auto;
 	}

</style>